cmake_minimum_required(VERSION 2.8)
project(cssspd)

#set(CMAKE_CXX_STANDARD 11)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set(EXTRA_FLAGS "-std=c++11 -Wall -Wextra -pedantic-errors")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}")
find_package(Boost COMPONENTS system REQUIRED)
find_library(LIBMYSQLCLIENT NAMES mysqlclient HINTS /usr/lib /usr/lib64 /usr/lib64/mysql)
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_SOURCE_DIR}/inc)
add_subdirectory(${PROJECT_SOURCE_DIR}/json-c)
add_subdirectory(${PROJECT_SOURCE_DIR}/src)
install(FILES ${PROJECT_SOURCE_DIR}/misc/cssspd.conf DESTINATION /etc)
install(FILES ${PROJECT_SOURCE_DIR}/misc/cssspd.service DESTINATION /usr/lib/systemd/system)
